import http from "@/utils/http";
import type { PortraitItem,Duration } from "./type";

/**
 * 查询用户画像列表
 */
export const getPortraitList = () => {
    return http.get<PortraitItem[]>("/crm/system/portraitList");
};

/**
 * 获取工期列表
 */
export const getDurationList = (portraitId:string) => {
    return http.get<Duration>(`/crm/buildserver/construction/duration/${portraitId}`);
};

/**
 * 修改工期配置
 */
export const updateDuration = (data:Duration) => {
    return http.post("/crm/buildserver/construction/duration/update", data);
};
/**
 * 查询内控工期
 */
export const getInternalDuration = (portraitId:string) => {
    return http.get<number>(`/crm/buildserver/construction/getInternalDuration/${portraitId}`);
};